﻿package mortal.game.view.guildNew.other
{
    import flash.events.*;
    import mortal.game.events.*;
    import mortal.game.manager.*;
    import mortal.game.mvc.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;
    import mortal.game.view.copy.QuestionCopy.data.*;
    import mortal.mvc.core.*;

    public class GuildBossIcon extends ActionBaseIcon
    {
        private static var _instance:GuildBossIcon;

        public function GuildBossIcon()
        {
            super(ResFileConst.GuildBossIcon);
            return;
        }// end function

        override protected function limitLv() : int
        {
            var _loc_1:* = LevelCheckUtil.getLevel(LevelCheckUtil.guildBoss);
            return _loc_1;
        }// end function

        override protected function clickHandler(event:MouseEvent) : void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.GuildActivityShow));
            return;
        }// end function

        public function setShowState(param1:Date, param2:int = 1) : void
        {
            var _loc_3:* = (param1.time - ClockManager.instance.nowDate.time) / 1000;
            setLeftTimeAndState(_loc_3, param2);
            return;
        }// end function

        public static function get isViewShow() : Boolean
        {
            return _instance && !_instance.isHide;
        }// end function

        public static function get instance() : GuildBossIcon
        {
            if (!_instance)
            {
                _instance = new GuildBossIcon;
            }
            return _instance;
        }// end function

        public static function hasInstance() : Boolean
        {
            return _instance != null;
        }// end function

    }
}
